/**
 * @Author: hl
 * @Date: 2019/8/16
 * @Last Modified by: hl
 * @Last Modified time:
 */

import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 预收款客户查询
export const prepayCustomer = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/finance/advancesReceived/prepayCustomer`, { params });
// 预收款明细查询
export const queryPrePay = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/finance/advancesReceived/queryPrePay`, { params });
// 查询所有员工
export const getAllUser = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/getDealerUser`);
// 客户弹窗查询
export const queryCustomer = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/basedata/freeSettlement/queryOwnerAndCustomer`, { params });

// 预收款客户查询
export const search = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/advancesOrder/search`, { params });

// 删除记录
export const doRemove = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/advancesOrder/deleteById`, { params });

// 取消上报
export const cancelReport = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/advancesOrder/cancelReport`, { params });

// 结算方式查询
export const gatheringType = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/gathering/gatheringType?`, { params });

// 保存预收款
export const save = params => axios.post(`${SERVER.DMSCLOUD_FINANCE}/advancesOrder/save`, params);

// 保存预收款
export const report = params => axios.post(`${SERVER.DMSCLOUD_FINANCE}/advancesOrder/report`, params);

// 根据Id查询详细记录
export const searchDetailsByOrderNo = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/advancesOrder/searchDetailsByOrderNo`, { params });
